<?php

namespace App\Enums;
//暴击奖池
class CriticalEnum {

    const TREE_DEFAULT_RATIO = 5; //百分之5
    const TREE_RATIO_MAX = 100;   //最大100
    const MODULE_TREE = 1;  //幸运树模块
    const MODULE_HAPPY = 2;
    const MODULE_TREE_MAX_GIFT_NUM = 3;  //幸运树最大配置奖品数

    const MODULE_DEFAULT_RATIO = [
        self::MODULE_TREE  => self::TREE_DEFAULT_RATIO,
        self::MODULE_HAPPY  => self::TREE_DEFAULT_RATIO,
    ];

    const TREE_COMMON_POOL = 1; //幸运树公池
    const TREE_SELF_POOL_SPECIAL = 40;//幸运树特殊个人
    const TREE_SELF_POOL_INDEPENDENT = 50;//幸运树个人独立

    const TYPE_ENUM_TO_IS_COMMON = [    //是否是公池，1是 0否
        self::TREE_COMMON_POOL => 1,
        self::TREE_SELF_POOL_SPECIAL => 0,
        self::TREE_SELF_POOL_INDEPENDENT => 0,
    ];

    const TREE_TYPE_ENUM = [
        // $type 奖池类型 1：单抽，2：十连，3：百连，4：新手，5：独立，30：特殊奖池, 40：特殊个人奖池, 50:特殊独立奖池
        1 => self::TREE_COMMON_POOL,
        2 => self::TREE_COMMON_POOL,
        3 => self::TREE_COMMON_POOL,
        40 => self::TREE_SELF_POOL_SPECIAL,
        50 => self::TREE_SELF_POOL_INDEPENDENT,
    ];

    //更改类型
    const WINNER_CRITICAL_GIFT = 1; //中了暴击礼物
    const POOL_CHANGE = 2;  //奖池更换
}
